<%@ include file="/common/taglibs.jsp"%>
<script>
jQuery(document).ready(function(){
	jQuery("#subject").validate();
});
</script>
	<div style="padding:5px;" align="center">
		<!-- <span style="font-size: 20px;">Enter Subject Details</span> --><br/><br/>
		<s:form name="subject" id="subject" action="saveOrUpdateSubject" method="post">
		 <table border="0">
		 	<tr>
		 		<td class="inputField" nowrap="nowrap">
	     			Class Name
	     		</td>
				<td class="inputTextBox">	
					<s:select  name="classYear" id="saveOrUpdatesubject_class_name" emptyOption="true"
										list="classYears" listKey="id" 
										listValue="name"
										cssStyle="width:200px"  value="%{subject.getClassYear().getId()}" />
				</td>
			</tr>	
	     	<tr>
	     		<td class="inputField" nowrap="nowrap">
	     			Subject Name
	     		</td>
				<td class="inputTextBox">	
					<s:textfield name="subject.subjectName"  id="saveOrUpdateSubject_subject_name" style="width:250px;" required="true" cssClass="required"/>
				</td>
			</tr>
			<tr>
	     		<td class="inputField" nowrap="nowrap">
	     			Subject Code
	     		</td>
				<td class="inputTextBox">	
					<s:textfield name="subject.code"  id="saveOrUpdateSubject_subject_code" style="width:250px;" required="true" cssClass="required" />
				</td>
			</tr>
			<tr>
				<td class="inputField" nowrap="nowrap">
	     			Status
	     		</td>
				<td class="inputTextBox">	
					<s:radio  name="subject.status" id="saveOrUpdateSubject_subject_status" list="#{'Active':'Active','InActive':'InActive'}"  value="subject.status" />
				</td>
			</tr>			
			<tr>
				<td colspan="2">
					<s:reset value="Clear" id="saveOrUpdateSubject_0" cssClass="button-gray" theme="simple"/>
					<s:if test="subject.id == ''">
						<s:submit value="Create" id="saveOrUpdateSubject_0" cssClass="button-green" theme="simple" />
					</s:if>
					<s:else>
						<s:submit value="Update" id="saveOrUpdateSubject_0" cssClass="button-green" theme="simple" />
					</s:else>
					<input type="button" value="List" id="saveOrUpdateSubject_0" class="button-gray" onclick="javascript:showLists('/showSubjectList');" />
				</td>	
			</tr>	
		</table>
		<s:hidden id="id" name="subject.id"></s:hidden>	
		</s:form>
	</div> 
